package cn.cscb.mms.server.mapper;

import cn.cscb.mms.pojo.entity.Customer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 测试用mapper，无需扩展
 *
 * @author Gao Yipeng
 */
public interface CustomerMapper extends BaseMapper<Customer>{

    @Select("select `id`,`cus_no`,`cus_name`,`description`,`state` from `cus_info` where `id` = #{id}")
    Customer getByIdTest01(Integer id);

    Customer getByIdTest02(Integer id);

    @Select("select `id`,`cus_no`,`cus_name`,`description`,`state` from `cus_info`")
    IPage<Customer> getPages(IPage<?> page);

    Customer getByIDandName(@Param("cusID") String cusID, @Param("cusName") String cusName);
}
